<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>我的主页</title>
    <meta name="keywords" content="课程学习问答系统">
    <meta name="description" content="课程学习问答系统">

    <script src="../static/js/jquery/jquery-2.1.4.min.js" type="text/javascript"></script>
    <script src="../static/layui/layui.js" type="text/javascript"></script>
    <script src="../static/js/index/index.js" type="text/javascript"></script>
    <script src="../static/js/index/freezeheader.js" type="text/javascript"></script>
    <script src="../static/layui/lay/modules/layer.js" type="text/javascript"></script>
    <link rel="stylesheet" href="../static/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="../static/layui/css/modules/layer/default/layer.css"/>
    <link rel="stylesheet" href="../static/css/global.css"/>
</head>
<body>
<%@ include file="header.jsp" %>


<div class="layui-container container" style=" padding-top:50px;">
    <div class="fly-home">
        <img src="https://unsplash.it/200/200?image=1005" alt="{{info.username}}">

        <h1>
            ${user.studentName} (学生)
            <i class="iconfont icon-nan"></i>
        </h1>


        <p class="fly-home-sign">（人生仿若一场修行）</p>
    </div>

    <div class="main fly-home-main" style="border:0px; border-style:solid">
        <div class="layui-inline fly-home-jie">
            <div class="fly-panel">
                <h3 class="fly-panel-title"> ${user.studentName} 最近的提问</h3>
                <%--查找出此id下对应的问题--%>
                <ul class="jie-row">
                    <c:forEach items="${questionsByStudentId}" var="question">
                        <li>
                            <span class="fly-jing">精</span>
                            <a href="questionOne/${question.questionId}" class="jie-title">${question.questionText}</a>
                            <i><fmt:formatDate value="${question.questionTime}" pattern="yyyy-MM-dd HH:mm:ss"/></i>
                        </li>
                    </c:forEach>


                </ul>
               </div>
        </div>
        <hr class="layui-bg-green" style="height:2px;">
        <div class="layui-inline fly-home-da">
            <div class="fly-panel">
                <h3 class="fly-panel-title">${user.studentName} 最近的评论</h3>
                <ul class="home-jieda">

                </ul>
                <c:forEach items="${comments}" var="comment">
                    <li>
                            <%--<span class="fly-jing">精</span>--%>

                        <p>
                            <i><fmt:formatDate value="${comment.commentTime}"
                                               pattern="yyyy-MM-dd HH:mm:ss"/></i>---
                                <span> 在问题
                                       ><a href="questionOne/${comment.questionId}"
                                                                  class="jie-title"  style="color: #1E9FFF">${comment.questionId}</a>中评论：</span>
                        </p>
                        <div class="home-dacontent">
                                ${comment.commentContent}

                        </div>
                    </li>
                </c:forEach>
            </div>
        </div>

    </div>

</div>
<!--分页
<div id="page"></div>
-->
<%@ include file="footer.jsp" %>

</body>
</html>
